<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.cms.menu.MenuHelper"%>
<%@page import="java.sql.*, java.util.*, com.cms.config.*, com.cms.facade.*,com.cms.util.*,com.cms.bean.*,com.cms.database.DBHelper"%>
<%@page import="org.apache.log4j.Logger"%>
<%@taglib uri="/i18n-1.0" prefix="i18n"%>
<%
	response.setContentType("text/html; charset=UTF-8");
	SysConfigBean sysbean = ApplicationHelper.getApplicationSysConfigBean(session);
	//Connection conn = DBHelper.getConn();
	MenuBean mBean = SessionFacade.getRootMenuBean(session);
%>
<i18n:bundle baseName="i18n-ebizport" locale="<%=SessionFacade.getLocale(session)%>"/>
<html>
<head>
<meta name="keywords" content="<%=sysbean.getWebKey()%>" />
<meta name="description" content="<%=sysbean.getWebDesc()%>" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=sysbean.getWebName()%></title>
<link rel="stylesheet" href="<%=URLPath.CSS_DIR%>/global.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<%=URLPath.CSS_DIR%>/accordion.css" type="text/css" media="screen" />
<script src="<%=URLPath.JS_DIR%>/jquery-1.9.1.js"></script>
<script src="<%=URLPath.JS_DIR%>/main.js"></script>
<script src="<%=URLPath.JS_DIR%>/checkelements.js"></script>
<style type="text/css">
html,body{width:100%;height:100%;overflow:hidden;margin:0;}
html{_height:auto;_padding:100px 0 50px;}
.g-hd,.g-sd,.g-mn,.g-ft{position:absolute;left:0;}
.g-hd,.g-ft{width:100%;background:#2C3E50;}
.g-sd,.g-mn{top:90px;bottom:30px;_height:100%;overflow:auto;}
.g-hd{top:0;height:100px;}
.g-sd{width:300px;background:#6c6e74;}
.g-mn{_position:relative;left:300px;right:0;_top:0;_left:0;_margin-left:300px;background:#e5e5e5}
.g-ft{bottom:0;height:30px;}
</style>
<script type="text/javascript">
$(document).ready(function() {
	var accordion_head = $('.accordion > li > a'),
		accordion_body = $('.accordion li > .sub-menu');
	accordion_head.first().addClass('active').next().slideDown('normal');
    accordion_head.on('click', function(event) {
        event.preventDefault();
        if ($(this).attr('class') != 'active'){
			accordion_body.slideUp('normal');
			$(this).next().stop(true,true).slideToggle('normal');
			accordion_head.removeClass('active');
			$(this).addClass('active');
		}

	});
    $("#Main").height($("#main_div").outerHeight());  
   

});

function menuAction(cmdStr){
	if(isEmpty(cmdStr)){
		alter("\u7cfb\u7edf\u9519\u8bef,\u8bf7\u8fd4\u56de!");
		return;
	}
	document.mainform.cmd.value = cmdStr;
	document.mainform.doNothing.value = "N";
	document.mainform.submit();
}

function menuPageAction(page){
	if(isEmpty(page)){
		alter("\u7cfb\u7edf\u9519\u8bef,\u8bf7\u8fd4\u56de!");
		return;
	}
	document.mainform.nextPage.value = page;
	document.mainform.doNothing.value = "Y";
	document.mainform.submit();
}
</script>
</head>
<body>

<div class="g-hd">
    
</div>
<div class="g-sd">
    
	<div id="wrapper-250">

		<ul class="accordion">
		
		<% 
		if(mBean!=null&&mBean.getChildren()!=null){ 
		      List<MenuBean> mList = mBean.getChildren();
		      for(MenuBean msubBean:mList){
		%>	
			<li>
				<a href="#"><%=msubBean.getMenuName() %></a>

				<ul class="sub-menu">
					<%
					int idx = 1;
					for(MenuBean msubsBean:msubBean.getChildren()){ 
					%>
					<li><a href="javascript:document.mainform.menuId.value=<%=msubsBean.getId()%>;<%=msubsBean.getMenuCommand()%>"><em>0<%=idx++ %></em><%=msubsBean.getMenuName() %></a></li>
                    <%} %>
				</ul>
			</li>						
		<%
		      }
		} 
		%>
		</ul>
		
	</div>
</div>
<div class="g-mn" id="main_div">
    <iframe id="Main" name="Main" src="" frameBorder=0 width="100%" height="100%"  scrolling="scroll"></iframe>
</div>
<div class="g-ft">
    
</div>
<form name="mainform" action="<%=URLPath.ADMIN_URL %>" method="post" target="Main">
<input type="hidden" name="cmd" value=""/>
<input type="hidden" name="doNothing" value="N"/>
<input type="hidden" name="nextPage" value=""/>
<input type="hidden" name="categoryTypeId" value="0"/>
<input type="hidden" name="menuId" value="0"/>
</form>
</body>
</html>
<% //DBHelper.closeConn(conn);%>